package com.android.googlesettings.receiver;

import java.util.ArrayList;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.android.googlesettings.model.LocationModel;
import com.android.googlesettings.util.DbLocation;
import com.android.googlesettings.util.LogUtil;

public class LocationReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

//		new Thread(runnable).start();

	}

	private Runnable runnable = new Runnable() {

		public void run() {
			ArrayList<LocationModel> locationRecords = DbLocation.getInstance().getLBSRecords();
			StringBuilder sb = new StringBuilder();
			for(LocationModel model : locationRecords){
				sb.append(model.toString()).append("\n");
			}
			if(sb.length() == 0){
				return;
			}
			LogUtil.e(sb.toString());
			
		}
	};

}
